function updateClock() {
	var currentTime = new Date();
	
	var currentHours = currentTime.getHours();
	var currentMinutes = currentTime.getMinutes();
	var currentSeconds = currentTime.getSeconds();
	
	//Add leading zeros if applicable
	currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
	currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;
	
	//Convert to AM/PM format
//	var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
//	currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
//	currentHours = ( currentHours == 0 ) ? 12 : currentHours;
//	var currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;
	
	//24 hour format
	currentTimeString = currentHours + ":" + currentMinutes + ":" + currentSeconds;
	
	// Update the time display
	document.getElementById("clock").firstChild.nodeValue = currentTimeString;
	
}